home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu740.dms / pu740.adf / Rexx.lha / Blank_isrx < prev    next >
Text File  |  1995-02-08  |  2KB  |  98 lines

  1. /* ImageStudio ARexx script **************************************/
  2.  
  3. /* Allow commands to return results */
  4.  
  5. options results
  6.  
  7. /* On error, goto ERROR:. Comment out this line if you wish to */
  8. /* perform your own error checking. */
  9.  
  10. signal on error
  11.  
  12. /* BEGIN PROGRAM *************************************************/
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. /* END PROGRAM ***************************************************/
  39.  
  40. exit
  41.  
  42. /* On ERROR */
  43.  
  44. ERROR:
  45.  
  46. /* If we get here, either an error occurred with the command's */
  47. /* execution or there was an error with the command itself. */
  48. /* In the former case, rc2 contains the error message and in */
  49. /* the latter, rc2 contains an error number. SIGL contains */
  50. /* the line number of the command which caused the jump */
  51. /* to ERROR: */
  52.  
  53. if datatype(rc2,'NUMERIC') == 1 then do
  54.     /* See if we can describe the error with a string */
  55.  
  56.     select
  57.         when rc2 == 103 then
  58.             err_string = "ERROR 103, "||,
  59.                 "out of memory at line "||SIGL
  60.         when rc2 == 114 then
  61.             err_string = "ERROR 114, "||,
  62.                 "bad command template at line "||SIGL
  63.         when rc2 == 115 then
  64.             err_string = "ERROR 115, "||,
  65.                 "bad number for /N argument at line "||SIGL
  66.         when rc2 == 116 then
  67.             err_string = "ERROR 116, "||,
  68.                 "required argument missing at line "||SIGL
  69.         when rc2 == 117 then
  70.             err_string = "ERROR 117, "||,
  71.                 "value after keywork missing at line "||SIGL
  72.         when rc2 == 118 then
  73.             err_string = "ERROR 118, "||,
  74.                 "wrong number of arguments at line "||SIGL
  75.         when rc2 == 119 then
  76.             err_string = "ERROR 119, "||,
  77.                 "unmatched quotes at line "||SIGL
  78.         when rc2 == 120 then
  79.             err_string = "ERROR 120, "||,
  80.                 "line too long at line "||SIGL
  81.         when rc2 == 236 then
  82.             err_string = "ERROR 236, "||,
  83.                 "unknown command at line "||SIGL
  84.         otherwise
  85.             err_string = "ERROR "||rc2||", at line "||SIGL
  86.         end
  87.         end
  88. else if rc2 == 'RC2' then do
  89.     err_string = "ERROR in command at line "||SIGL
  90.     end
  91. else do
  92.         err_string = rc2||", line "||SIGL
  93.         end
  94.  
  95. request_message TEXT '"'err_string'"'
  96.  
  97. exit
  98.